package models

import "gorm.io/gorm"

type User struct {
	UserName     string `gorm:"type:varchar(30)"`
	UserPassword string `gorm:"type:varchar(30)"`
	gorm.Model
}

func (u *User) GetUserByUserName() error {
	return DB.Where("user_name = ?", u.UserName).Limit(1).Find(&u).Error
}
func (u *User) CreateUser() error {
	return DB.Create(&u).Error
}
